package cn.btks.backstagemanage.division.service.impl;

import cn.btks.backstagemanage.division.pojo.County;
import cn.btks.backstagemanage.division.repository.CountyRepository;
import cn.btks.backstagemanage.division.service.CountyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author lijun
 * @Date 2021/1/25 11:03
 */
@Service
public class CountyServiceImpl implements CountyService {

    @Autowired
    CountyRepository countyRepository;

    @Override
    public List<County> findAll() {
        return countyRepository.findAll();
    }

    @Override
    public List<County> findAllByCityId(Long cityId) {
        return countyRepository.findAllByCityId(cityId);
    }

    @Override
    public List<County> findAllByEscrowId(Long cityId) {
        return countyRepository.findAllByEscrowId(cityId);
    }
}
